package com.yy.young.travel.service;

import com.yy.young.dal.util.Page;
import com.yy.young.travel.model.SourceGrade;
import java.util.List;

/**
 * 资源评分管理服务接口
 * Created by hua on 2018-03-22.
 */
public interface ISourceGradeService {

    /**
     * 获取数据列表
     * @param sourceGrade
     * @return
     * @throws Exception
     */
    List<SourceGrade> getSourceGradeList(SourceGrade sourceGrade) throws Exception;

    /**
     * 获取数据列表(分页)
     * @param sourceGrade
     * @param page 分页参数
     * @return
     * @throws Exception
     */
    List<SourceGrade> getSourceGradePage(SourceGrade sourceGrade, Page page) throws Exception;

    /**
     * 根据id获取信息
     * @param id
     * @return
     * @throws Exception
     */
    SourceGrade getSourceGrade(String id) throws Exception;

    /**
     * 修改
     * @param sourceGrade
     * @return
     * @throws Exception
     */
    int updateSourceGrade(SourceGrade sourceGrade) throws Exception;

    /**
     * 批量删除
     * @param idArr id数组
     * @return
     * @throws Exception
     */
    int deleteSourceGrade(String[] idArr) throws Exception;


    /**
     * 删除单条
     * @param id
     * @return
     * @throws Exception
     */
    int deleteSourceGrade(String id) throws Exception;

    /**
     * 插入
     * @param sourceGrade
     * @return
     * @throws Exception
     */
    int insertSourceGrade(SourceGrade sourceGrade) throws Exception;

    /**
     * 批量插入
     * @param list
     * @return
     * @throws Exception
     */
    int batchInsertSourceGrade(List<SourceGrade> list) throws Exception;

    /**
     * 将得分数据插入到资源中
     * @param list
     * @param sourceId
     * @return
     * @throws Exception
     */
    int refreshSourceGrade(List<SourceGrade> list, String sourceId) throws Exception;

    /**
     * 删除资源的得分数据
     * @param sourceId
     * @return
     * @throws Exception
     */
    int deleteSourceGradeBySourceId(String sourceId) throws Exception;
}